<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.5/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.4.5/themes/icon.css">
	<script type="text/javascript" src="js/jquery-easyui-1.4.5/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery-easyui-1.4.5/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="js/jquery-easyui-1.4.5/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript">
		
		// 文件上传提交
		function submitForm(){
			$('#ff').form({
			    url:'fileupload.do',
			    onSubmit: function(){
			    	true
			    },
			    success:function(d){
			    	$.messager.show({
						title:'温馨提示',
						msg:d,
						timeout:5000,
						showType:'slide'
					});	
			    	
			    }  
			});
			// submit the form
			$('#ff').submit();
		}
		
		function clearForm(){
			$('#ff').form('clear');
			$('#win').window('close');
		}
	
	
	</script>
</head>

<body>
	
   
    <div id="win" class="easyui-window" title="添加部门" style="width:500px;height:300px"
	    data-options="modal:true" enctype="multipart/form-data">
	    <form id="ff" method="post" enctype="multipart/form-data">
	    	<table cellpadding="5">
	    		<tr>
	    			<td>部门名称:</td>
	    			<td><input class="easyui-textbox" type="text" id="dname" name="dname" data-options="required:true"></input></td>
	    		</tr>
	    		<tr>
	    			<td>所在地:</td>
	    			<td><input class="easyui-textbox" type="text" name="loc" data-options="required:true"></input></td>
	    		</tr>
	    		<tr>
	    			<td>图片上传:</td>
	    			<td>  <input class="easyui-filebox" style="width:300px" name ="file"></input></td>
	    		</tr>
	    		
	    	</table>
	    </form>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">添加</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">取消</a>
	    </div>
	    
	    
	</div>
    
    


    
</body>
</html>